import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

/**
 * @Author: admin
 * @Description:
 * @Date: 2019/2/23 12:48
 */

public class Test {

    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {
//        HashSet hashSet=new HashSet();
//        System.out.println( hashSet.add(1));
//        System.out.println( hashSet.add(1));;
//        System.out.println(hashSet.size());

        String  a="123";
        String aa=new String("123");
        System.out.println(a==aa);
        System.out.println(a.hashCode());
        System.out.println(aa.hashCode());
        Field field=a.getClass().getDeclaredField("value");
        field.setAccessible(true);

        System.out.println(a);
        String  b=a.substring(1,2);
        System.out.println(b);
        char value[] = (char[]) field.get(a);
        value[0]='A';
        //field.setAccessible(true);
        //field.set(a,"1234");
        System.out.println(a);
        a.trim();


        Father father=new Son();
        father.func1(new HashMap());

        Son son=new Son();
        Map map=new HashMap();
        son.func1(map);
        son.func1(new HashMap());
    }
}
